(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^3).


The TRS R consists of the following rules:

plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(0, s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(y, z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)

Rewrite Strategy: INNERMOST

(1) NestedDefinedSymbolProof (BOTH BOUNDS(ID, ID) transformation)

The following defined symbols can occur below the 0th argument of if: plus, eq, divides, div, times, quot
The following defined symbols can occur below the 1th argument of plus: plus, times, div, quot
The following defined symbols can occur below the 1th argument of eq: plus, div, times, quot
The following defined symbols can occur below the 0th argument of times: div, quot

Hence, the left-hand sides of the following rules are not basic-reachable and can be removed:
div(div(x, y), z) → div(x, times(y, z))

(2) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^3).


The TRS R consists of the following rules:

if(false, x, y) → pr(x, y)
plus(s(x), y) → s(plus(x, y))
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
times(s(x), y) → plus(y, times(x, y))
divides(y, x) → eq(x, times(div(x, y), y))
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
plus(x, 0) → x
plus(0, y) → y
div(x, y) → quot(x, y, y)
times(0, y) → 0
if(true, x, y) → false
pr(x, s(0)) → true
eq(0, 0) → true
quot(x, 0, s(z)) → s(div(x, s(z)))
div(0, y) → 0
prime(s(s(x))) → pr(s(s(x)), s(x))
times(s(0), y) → y
quot(s(x), s(y), z) → quot(x, y, z)
quot(0, s(y), z) → 0

Rewrite Strategy: INNERMOST

(3) TrsToWeightedTrsProof (BOTH BOUNDS(ID, ID) transformation)

Transformed TRS to weighted TRS

(4) Obligation:

The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^3).


The TRS R consists of the following rules:

if(false, x, y) → pr(x, y) [1]
plus(s(x), y) → s(plus(x, y)) [1]
eq(s(x), 0) → false [1]
eq(0, s(y)) → false [1]
eq(s(x), s(y)) → eq(x, y) [1]
times(s(x), y) → plus(y, times(x, y)) [1]
divides(y, x) → eq(x, times(div(x, y), y)) [1]
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y)) [1]
plus(x, 0) → x [1]
plus(0, y) → y [1]
div(x, y) → quot(x, y, y) [1]
times(0, y) → 0 [1]
if(true, x, y) → false [1]
pr(x, s(0)) → true [1]
eq(0, 0) → true [1]
quot(x, 0, s(z)) → s(div(x, s(z))) [1]
div(0, y) → 0 [1]
prime(s(s(x))) → pr(s(s(x)), s(x)) [1]
times(s(0), y) → y [1]
quot(s(x), s(y), z) → quot(x, y, z) [1]
quot(0, s(y), z) → 0 [1]

Rewrite Strategy: INNERMOST

(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(6) Obligation:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

if(false, x, y) → pr(x, y) [1]
plus(s(x), y) → s(plus(x, y)) [1]
eq(s(x), 0) → false [1]
eq(0, s(y)) → false [1]
eq(s(x), s(y)) → eq(x, y) [1]
times(s(x), y) → plus(y, times(x, y)) [1]
divides(y, x) → eq(x, times(div(x, y), y)) [1]
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y)) [1]
plus(x, 0) → x [1]
plus(0, y) → y [1]
div(x, y) → quot(x, y, y) [1]
times(0, y) → 0 [1]
if(true, x, y) → false [1]
pr(x, s(0)) → true [1]
eq(0, 0) → true [1]
quot(x, 0, s(z)) → s(div(x, s(z))) [1]
div(0, y) → 0 [1]
prime(s(s(x))) → pr(s(s(x)), s(x)) [1]
times(s(0), y) → y [1]
quot(s(x), s(y), z) → quot(x, y, z) [1]
quot(0, s(y), z) → 0 [1]

The TRS has the following type information:
if :: false:true → s:0 → s:0 → false:true
false :: false:true
pr :: s:0 → s:0 → false:true
plus :: s:0 → s:0 → s:0
s :: s:0 → s:0
eq :: s:0 → s:0 → false:true
0 :: s:0
times :: s:0 → s:0 → s:0
divides :: s:0 → s:0 → false:true
div :: s:0 → s:0 → s:0
quot :: s:0 → s:0 → s:0 → s:0
true :: false:true
prime :: s:0 → false:true

Rewrite Strategy: INNERMOST

(7) CompletionProof (UPPER BOUND(ID) transformation)

The transformation into a RNTS is sound, since:

(a) The obligation is a constructor system where every type has a constant constructor,

(b) The following defined symbols do not have to be completely defined, as they can never occur inside other defined symbols:


if
pr
prime

(c) The following functions are completely defined:

times
div
divides
plus
eq
quot

Due to the following rules being added:

quot(v0, v1, v2) → 0 [0]

And the following fresh constants: none

(8) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

if(false, x, y) → pr(x, y) [1]
plus(s(x), y) → s(plus(x, y)) [1]
eq(s(x), 0) → false [1]
eq(0, s(y)) → false [1]
eq(s(x), s(y)) → eq(x, y) [1]
times(s(x), y) → plus(y, times(x, y)) [1]
divides(y, x) → eq(x, times(div(x, y), y)) [1]
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y)) [1]
plus(x, 0) → x [1]
plus(0, y) → y [1]
div(x, y) → quot(x, y, y) [1]
times(0, y) → 0 [1]
if(true, x, y) → false [1]
pr(x, s(0)) → true [1]
eq(0, 0) → true [1]
quot(x, 0, s(z)) → s(div(x, s(z))) [1]
div(0, y) → 0 [1]
prime(s(s(x))) → pr(s(s(x)), s(x)) [1]
times(s(0), y) → y [1]
quot(s(x), s(y), z) → quot(x, y, z) [1]
quot(0, s(y), z) → 0 [1]
quot(v0, v1, v2) → 0 [0]

The TRS has the following type information:
if :: false:true → s:0 → s:0 → false:true
false :: false:true
pr :: s:0 → s:0 → false:true
plus :: s:0 → s:0 → s:0
s :: s:0 → s:0
eq :: s:0 → s:0 → false:true
0 :: s:0
times :: s:0 → s:0 → s:0
divides :: s:0 → s:0 → false:true
div :: s:0 → s:0 → s:0
quot :: s:0 → s:0 → s:0 → s:0
true :: false:true
prime :: s:0 → false:true

Rewrite Strategy: INNERMOST

(9) NarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Narrowed the inner basic terms of all right-hand sides by a single narrowing step.

(10) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

if(false, x, y) → pr(x, y) [1]
plus(s(x), y) → s(plus(x, y)) [1]
eq(s(x), 0) → false [1]
eq(0, s(y)) → false [1]
eq(s(x), s(y)) → eq(x, y) [1]
times(s(s(x')), y) → plus(y, plus(y, times(x', y))) [2]
times(s(0), y) → plus(y, 0) [2]
times(s(s(0)), y) → plus(y, y) [2]
divides(y, x) → eq(x, times(quot(x, y, y), y)) [2]
divides(y, 0) → eq(0, times(0, y)) [2]
pr(x, s(s(y))) → if(eq(x, times(div(x, s(s(y))), s(s(y)))), x, s(y)) [2]
plus(x, 0) → x [1]
plus(0, y) → y [1]
div(x, y) → quot(x, y, y) [1]
times(0, y) → 0 [1]
if(true, x, y) → false [1]
pr(x, s(0)) → true [1]
eq(0, 0) → true [1]
quot(x, 0, s(z)) → s(div(x, s(z))) [1]
div(0, y) → 0 [1]
prime(s(s(x))) → pr(s(s(x)), s(x)) [1]
times(s(0), y) → y [1]
quot(s(x), s(y), z) → quot(x, y, z) [1]
quot(0, s(y), z) → 0 [1]
quot(v0, v1, v2) → 0 [0]

The TRS has the following type information:
if :: false:true → s:0 → s:0 → false:true
false :: false:true
pr :: s:0 → s:0 → false:true
plus :: s:0 → s:0 → s:0
s :: s:0 → s:0
eq :: s:0 → s:0 → false:true
0 :: s:0
times :: s:0 → s:0 → s:0
divides :: s:0 → s:0 → false:true
div :: s:0 → s:0 → s:0
quot :: s:0 → s:0 → s:0 → s:0
true :: false:true
prime :: s:0 → false:true

Rewrite Strategy: INNERMOST

(11) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID) transformation)

Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction.
The constant constructors are abstracted as follows:

false => 0
0 => 0
true => 1

(12) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 1 }→ quot(x, y, y) :|: z' = x, z'' = y, x >= 0, y >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' = y, y >= 0, z' = 0
divides(z', z'') -{ 2 }→ eq(x, times(quot(x, y, y), y)) :|: y >= 0, x >= 0, z'' = x, z' = y
divides(z', z'') -{ 2 }→ eq(0, times(0, y)) :|: z'' = 0, y >= 0, z' = y
eq(z', z'') -{ 1 }→ eq(x, y) :|: z' = 1 + x, x >= 0, y >= 0, z'' = 1 + y
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' = 1 + x, x >= 0
eq(z', z'') -{ 1 }→ 0 :|: y >= 0, z'' = 1 + y, z' = 0
if(z', z'', z1) -{ 1 }→ pr(x, y) :|: z1 = y, x >= 0, y >= 0, z'' = x, z' = 0
if(z', z'', z1) -{ 1 }→ 0 :|: z1 = y, x >= 0, y >= 0, z'' = x, z' = 1
plus(z', z'') -{ 1 }→ x :|: z'' = 0, z' = x, x >= 0
plus(z', z'') -{ 1 }→ y :|: z'' = y, y >= 0, z' = 0
plus(z', z'') -{ 1 }→ 1 + plus(x, y) :|: z' = 1 + x, z'' = y, x >= 0, y >= 0
pr(z', z'') -{ 2 }→ if(eq(x, times(div(x, 1 + (1 + y)), 1 + (1 + y))), x, 1 + y) :|: z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y)
pr(z', z'') -{ 1 }→ 1 :|: z' = x, x >= 0, z'' = 1 + 0
prime(z') -{ 1 }→ pr(1 + (1 + x), 1 + x) :|: x >= 0, z' = 1 + (1 + x)
quot(z', z'', z1) -{ 1 }→ quot(x, y, z) :|: z' = 1 + x, z1 = z, z >= 0, x >= 0, y >= 0, z'' = 1 + y
quot(z', z'', z1) -{ 1 }→ 0 :|: z1 = z, z >= 0, y >= 0, z'' = 1 + y, z' = 0
quot(z', z'', z1) -{ 0 }→ 0 :|: v0 >= 0, z1 = v2, v1 >= 0, z'' = v1, v2 >= 0, z' = v0
quot(z', z'', z1) -{ 1 }→ 1 + div(x, 1 + z) :|: z'' = 0, z >= 0, z' = x, x >= 0, z1 = 1 + z
times(z', z'') -{ 1 }→ y :|: z'' = y, y >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(y, y) :|: z' = 1 + (1 + 0), z'' = y, y >= 0
times(z', z'') -{ 2 }→ plus(y, plus(y, times(x', y))) :|: z' = 1 + (1 + x'), z'' = y, x' >= 0, y >= 0
times(z', z'') -{ 2 }→ plus(y, 0) :|: z'' = y, y >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ 0 :|: z'' = y, y >= 0, z' = 0

(13) SimplificationProof (BOTH BOUNDS(ID, ID) transformation)

Simplified the RNTS by moving equalities from the constraints into the right-hand sides.

(14) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 1 }→ quot(z', z'', z'') :|: z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 2 }→ eq(z'', times(quot(z'', z', z'), z')) :|: z' >= 0, z'' >= 0
divides(z', z'') -{ 2 }→ eq(0, times(0, z')) :|: z'' = 0, z' >= 0
eq(z', z'') -{ 1 }→ eq(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 0 :|: z'' - 1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ 0 :|: z'' >= 0, z1 >= 0, z' = 1
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 2 }→ if(eq(z', times(div(z', 1 + (1 + (z'' - 2))), 1 + (1 + (z'' - 2)))), z', 1 + (z'' - 2)) :|: z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1 + 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 1 }→ quot(z' - 1, z'' - 1, z1) :|: z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 1 }→ 0 :|: z1 >= 0, z'' - 1 >= 0, z' = 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 1 }→ 1 + div(z', 1 + (z1 - 1)) :|: z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(z'', z'') :|: z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', plus(z'', times(z' - 2, z''))) :|: z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', 0) :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0

(15) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID) transformation)

Found the following analysis order by SCC decomposition:

{ eq }
{ div, quot }
{ plus }
{ times }
{ if, pr }
{ divides }
{ prime }

(16) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 1 }→ quot(z', z'', z'') :|: z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 2 }→ eq(z'', times(quot(z'', z', z'), z')) :|: z' >= 0, z'' >= 0
divides(z', z'') -{ 2 }→ eq(0, times(0, z')) :|: z'' = 0, z' >= 0
eq(z', z'') -{ 1 }→ eq(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 0 :|: z'' - 1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ 0 :|: z'' >= 0, z1 >= 0, z' = 1
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 2 }→ if(eq(z', times(div(z', 1 + (1 + (z'' - 2))), 1 + (1 + (z'' - 2)))), z', 1 + (z'' - 2)) :|: z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1 + 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 1 }→ quot(z' - 1, z'' - 1, z1) :|: z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 1 }→ 0 :|: z1 >= 0, z'' - 1 >= 0, z' = 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 1 }→ 1 + div(z', 1 + (z1 - 1)) :|: z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(z'', z'') :|: z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', plus(z'', times(z' - 2, z''))) :|: z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', 0) :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0

Function symbols to be analyzed: {eq}, {div,quot}, {plus}, {times}, {if,pr}, {divides}, {prime}

(17) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: eq
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(18) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 1 }→ quot(z', z'', z'') :|: z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 2 }→ eq(z'', times(quot(z'', z', z'), z')) :|: z' >= 0, z'' >= 0
divides(z', z'') -{ 2 }→ eq(0, times(0, z')) :|: z'' = 0, z' >= 0
eq(z', z'') -{ 1 }→ eq(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 0 :|: z'' - 1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ 0 :|: z'' >= 0, z1 >= 0, z' = 1
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 2 }→ if(eq(z', times(div(z', 1 + (1 + (z'' - 2))), 1 + (1 + (z'' - 2)))), z', 1 + (z'' - 2)) :|: z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1 + 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 1 }→ quot(z' - 1, z'' - 1, z1) :|: z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 1 }→ 0 :|: z1 >= 0, z'' - 1 >= 0, z' = 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 1 }→ 1 + div(z', 1 + (z1 - 1)) :|: z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(z'', z'') :|: z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', plus(z'', times(z' - 2, z''))) :|: z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', 0) :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0

Function symbols to be analyzed: {eq}, {div,quot}, {plus}, {times}, {if,pr}, {divides}, {prime}
Previous analysis results are:
eq: runtime: ?, size: O(1) [1]

(19) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using PUBS for: eq
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + z''

(20) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 1 }→ quot(z', z'', z'') :|: z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 2 }→ eq(z'', times(quot(z'', z', z'), z')) :|: z' >= 0, z'' >= 0
divides(z', z'') -{ 2 }→ eq(0, times(0, z')) :|: z'' = 0, z' >= 0
eq(z', z'') -{ 1 }→ eq(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 0 :|: z'' - 1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ 0 :|: z'' >= 0, z1 >= 0, z' = 1
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 2 }→ if(eq(z', times(div(z', 1 + (1 + (z'' - 2))), 1 + (1 + (z'' - 2)))), z', 1 + (z'' - 2)) :|: z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1 + 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 1 }→ quot(z' - 1, z'' - 1, z1) :|: z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 1 }→ 0 :|: z1 >= 0, z'' - 1 >= 0, z' = 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 1 }→ 1 + div(z', 1 + (z1 - 1)) :|: z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(z'', z'') :|: z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', plus(z'', times(z' - 2, z''))) :|: z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', 0) :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0

Function symbols to be analyzed: {div,quot}, {plus}, {times}, {if,pr}, {divides}, {prime}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [1]

(21) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(22) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 1 }→ quot(z', z'', z'') :|: z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 2 }→ eq(z'', times(quot(z'', z', z'), z')) :|: z' >= 0, z'' >= 0
divides(z', z'') -{ 2 }→ eq(0, times(0, z')) :|: z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 0 :|: z'' - 1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ 0 :|: z'' >= 0, z1 >= 0, z' = 1
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 2 }→ if(eq(z', times(div(z', 1 + (1 + (z'' - 2))), 1 + (1 + (z'' - 2)))), z', 1 + (z'' - 2)) :|: z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1 + 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 1 }→ quot(z' - 1, z'' - 1, z1) :|: z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 1 }→ 0 :|: z1 >= 0, z'' - 1 >= 0, z' = 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 1 }→ 1 + div(z', 1 + (z1 - 1)) :|: z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(z'', z'') :|: z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', plus(z'', times(z' - 2, z''))) :|: z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', 0) :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0

Function symbols to be analyzed: {div,quot}, {plus}, {times}, {if,pr}, {divides}, {prime}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [1]

(23) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: div
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z'

Computed SIZE bound using KoAT for: quot
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + z'

(24) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 1 }→ quot(z', z'', z'') :|: z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 2 }→ eq(z'', times(quot(z'', z', z'), z')) :|: z' >= 0, z'' >= 0
divides(z', z'') -{ 2 }→ eq(0, times(0, z')) :|: z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 0 :|: z'' - 1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ 0 :|: z'' >= 0, z1 >= 0, z' = 1
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 2 }→ if(eq(z', times(div(z', 1 + (1 + (z'' - 2))), 1 + (1 + (z'' - 2)))), z', 1 + (z'' - 2)) :|: z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1 + 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 1 }→ quot(z' - 1, z'' - 1, z1) :|: z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 1 }→ 0 :|: z1 >= 0, z'' - 1 >= 0, z' = 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 1 }→ 1 + div(z', 1 + (z1 - 1)) :|: z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(z'', z'') :|: z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', plus(z'', times(z' - 2, z''))) :|: z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', 0) :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0

Function symbols to be analyzed: {div,quot}, {plus}, {times}, {if,pr}, {divides}, {prime}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [1]
div: runtime: ?, size: O(n1) [z']
quot: runtime: ?, size: O(n1) [1 + z']

(25) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using KoAT for: div
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 3 + 3·z'

Computed RUNTIME bound using KoAT for: quot
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 5 + 3·z' + z''

(26) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 1 }→ quot(z', z'', z'') :|: z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 2 }→ eq(z'', times(quot(z'', z', z'), z')) :|: z' >= 0, z'' >= 0
divides(z', z'') -{ 2 }→ eq(0, times(0, z')) :|: z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 0 :|: z'' - 1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ 0 :|: z'' >= 0, z1 >= 0, z' = 1
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 2 }→ if(eq(z', times(div(z', 1 + (1 + (z'' - 2))), 1 + (1 + (z'' - 2)))), z', 1 + (z'' - 2)) :|: z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1 + 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 1 }→ quot(z' - 1, z'' - 1, z1) :|: z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 1 }→ 0 :|: z1 >= 0, z'' - 1 >= 0, z' = 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 1 }→ 1 + div(z', 1 + (z1 - 1)) :|: z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(z'', z'') :|: z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', plus(z'', times(z' - 2, z''))) :|: z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', 0) :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0

Function symbols to be analyzed: {plus}, {times}, {if,pr}, {divides}, {prime}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [1]
div: runtime: O(n1) [3 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [5 + 3·z' + z''], size: O(n1) [1 + z']

(27) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(28) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 6 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 7 + z' + 3·z'' }→ eq(z'', times(s', z')) :|: s' >= 0, s' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 2 }→ eq(0, times(0, z')) :|: z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 0 :|: z'' - 1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ 0 :|: z'' >= 0, z1 >= 0, z' = 1
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 5 + 3·z' }→ if(eq(z', times(s'', 1 + (1 + (z'' - 2)))), z', 1 + (z'' - 2)) :|: s'' >= 0, s'' <= 1 * z', z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1 + 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 2 + 3·z' + z'' }→ s3 :|: s3 >= 0, s3 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 1 }→ 0 :|: z1 >= 0, z'' - 1 >= 0, z' = 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 4 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(z'', z'') :|: z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', plus(z'', times(z' - 2, z''))) :|: z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', 0) :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0

Function symbols to be analyzed: {plus}, {times}, {if,pr}, {divides}, {prime}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [1]
div: runtime: O(n1) [3 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [5 + 3·z' + z''], size: O(n1) [1 + z']

(29) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: plus
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z' + z''

(30) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 6 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 7 + z' + 3·z'' }→ eq(z'', times(s', z')) :|: s' >= 0, s' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 2 }→ eq(0, times(0, z')) :|: z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 0 :|: z'' - 1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ 0 :|: z'' >= 0, z1 >= 0, z' = 1
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 5 + 3·z' }→ if(eq(z', times(s'', 1 + (1 + (z'' - 2)))), z', 1 + (z'' - 2)) :|: s'' >= 0, s'' <= 1 * z', z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1 + 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 2 + 3·z' + z'' }→ s3 :|: s3 >= 0, s3 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 1 }→ 0 :|: z1 >= 0, z'' - 1 >= 0, z' = 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 4 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(z'', z'') :|: z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', plus(z'', times(z' - 2, z''))) :|: z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', 0) :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0

Function symbols to be analyzed: {plus}, {times}, {if,pr}, {divides}, {prime}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [1]
div: runtime: O(n1) [3 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [5 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: ?, size: O(n1) [z' + z'']

(31) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: plus
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + z'

(32) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 6 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 7 + z' + 3·z'' }→ eq(z'', times(s', z')) :|: s' >= 0, s' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 2 }→ eq(0, times(0, z')) :|: z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 0 :|: z'' - 1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ 0 :|: z'' >= 0, z1 >= 0, z' = 1
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 5 + 3·z' }→ if(eq(z', times(s'', 1 + (1 + (z'' - 2)))), z', 1 + (z'' - 2)) :|: s'' >= 0, s'' <= 1 * z', z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1 + 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 2 + 3·z' + z'' }→ s3 :|: s3 >= 0, s3 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 1 }→ 0 :|: z1 >= 0, z'' - 1 >= 0, z' = 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 4 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(z'', z'') :|: z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', plus(z'', times(z' - 2, z''))) :|: z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', 0) :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0

Function symbols to be analyzed: {times}, {if,pr}, {divides}, {prime}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [1]
div: runtime: O(n1) [3 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [5 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']

(33) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(34) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 6 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 7 + z' + 3·z'' }→ eq(z'', times(s', z')) :|: s' >= 0, s' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 2 }→ eq(0, times(0, z')) :|: z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 0 :|: z'' - 1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ 0 :|: z'' >= 0, z1 >= 0, z' = 1
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 + z' }→ 1 + s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 5 + 3·z' }→ if(eq(z', times(s'', 1 + (1 + (z'' - 2)))), z', 1 + (z'' - 2)) :|: s'' >= 0, s'' <= 1 * z', z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1 + 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 2 + 3·z' + z'' }→ s3 :|: s3 >= 0, s3 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 1 }→ 0 :|: z1 >= 0, z'' - 1 >= 0, z' = 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 4 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 3 + z'' }→ s5 :|: s5 >= 0, s5 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + z'' }→ s6 :|: s6 >= 0, s6 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(z'', plus(z'', times(z' - 2, z''))) :|: z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0

Function symbols to be analyzed: {times}, {if,pr}, {divides}, {prime}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [1]
div: runtime: O(n1) [3 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [5 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']

(35) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using PUBS for: times
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 2·z'·z'' + 2·z''

(36) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 6 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 7 + z' + 3·z'' }→ eq(z'', times(s', z')) :|: s' >= 0, s' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 2 }→ eq(0, times(0, z')) :|: z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 0 :|: z'' - 1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ 0 :|: z'' >= 0, z1 >= 0, z' = 1
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 + z' }→ 1 + s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 5 + 3·z' }→ if(eq(z', times(s'', 1 + (1 + (z'' - 2)))), z', 1 + (z'' - 2)) :|: s'' >= 0, s'' <= 1 * z', z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1 + 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 2 + 3·z' + z'' }→ s3 :|: s3 >= 0, s3 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 1 }→ 0 :|: z1 >= 0, z'' - 1 >= 0, z' = 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 4 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 3 + z'' }→ s5 :|: s5 >= 0, s5 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + z'' }→ s6 :|: s6 >= 0, s6 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(z'', plus(z'', times(z' - 2, z''))) :|: z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0

Function symbols to be analyzed: {times}, {if,pr}, {divides}, {prime}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [1]
div: runtime: O(n1) [3 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [5 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
times: runtime: ?, size: O(n2) [2·z'·z'' + 2·z'']

(37) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using PUBS for: times
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 3 + 4·z' + 2·z'·z'' + z''

(38) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 6 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 7 + z' + 3·z'' }→ eq(z'', times(s', z')) :|: s' >= 0, s' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 2 }→ eq(0, times(0, z')) :|: z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 0 :|: z'' - 1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ 0 :|: z'' >= 0, z1 >= 0, z' = 1
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 + z' }→ 1 + s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 5 + 3·z' }→ if(eq(z', times(s'', 1 + (1 + (z'' - 2)))), z', 1 + (z'' - 2)) :|: s'' >= 0, s'' <= 1 * z', z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1 + 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 2 + 3·z' + z'' }→ s3 :|: s3 >= 0, s3 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 1 }→ 0 :|: z1 >= 0, z'' - 1 >= 0, z' = 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 4 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 3 + z'' }→ s5 :|: s5 >= 0, s5 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + z'' }→ s6 :|: s6 >= 0, s6 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(z'', plus(z'', times(z' - 2, z''))) :|: z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0

Function symbols to be analyzed: {if,pr}, {divides}, {prime}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [1]
div: runtime: O(n1) [3 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [5 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
times: runtime: O(n2) [3 + 4·z' + 2·z'·z'' + z''], size: O(n2) [2·z'·z'' + 2·z'']

(39) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(40) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 6 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 11 + 4·s' + 2·s'·z' + s10 + 2·z' + 3·z'' }→ s11 :|: s10 >= 0, s10 <= 2 * (s' * z') + 2 * z', s11 >= 0, s11 <= 1, s' >= 0, s' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 6 + s12 + z' }→ s13 :|: s12 >= 0, s12 <= 2 * (0 * z') + 2 * z', s13 >= 0, s13 <= 1, z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 0 :|: z'' - 1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ 0 :|: z'' >= 0, z1 >= 0, z' = 1
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 + z' }→ 1 + s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 9 + 4·s'' + 2·s''·z'' + s14 + 3·z' + z'' }→ if(s15, z', 1 + (z'' - 2)) :|: s14 >= 0, s14 <= 2 * (s'' * (1 + (1 + (z'' - 2)))) + 2 * (1 + (1 + (z'' - 2))), s15 >= 0, s15 <= 1, s'' >= 0, s'' <= 1 * z', z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1 + 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 2 + 3·z' + z'' }→ s3 :|: s3 >= 0, s3 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 1 }→ 0 :|: z1 >= 0, z'' - 1 >= 0, z' = 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 4 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 3 + z'' }→ s5 :|: s5 >= 0, s5 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + z'' }→ s6 :|: s6 >= 0, s6 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ -1 + 4·z' + 2·z'·z'' + -1·z'' }→ s9 :|: s7 >= 0, s7 <= 2 * ((z' - 2) * z'') + 2 * z'', s8 >= 0, s8 <= 1 * z'' + 1 * s7, s9 >= 0, s9 <= 1 * z'' + 1 * s8, z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0

Function symbols to be analyzed: {if,pr}, {divides}, {prime}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [1]
div: runtime: O(n1) [3 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [5 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
times: runtime: O(n2) [3 + 4·z' + 2·z'·z'' + z''], size: O(n2) [2·z'·z'' + 2·z'']

(41) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: if
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

Computed SIZE bound using CoFloCo for: pr
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(42) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 6 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 11 + 4·s' + 2·s'·z' + s10 + 2·z' + 3·z'' }→ s11 :|: s10 >= 0, s10 <= 2 * (s' * z') + 2 * z', s11 >= 0, s11 <= 1, s' >= 0, s' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 6 + s12 + z' }→ s13 :|: s12 >= 0, s12 <= 2 * (0 * z') + 2 * z', s13 >= 0, s13 <= 1, z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 0 :|: z'' - 1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ 0 :|: z'' >= 0, z1 >= 0, z' = 1
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 + z' }→ 1 + s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 9 + 4·s'' + 2·s''·z'' + s14 + 3·z' + z'' }→ if(s15, z', 1 + (z'' - 2)) :|: s14 >= 0, s14 <= 2 * (s'' * (1 + (1 + (z'' - 2)))) + 2 * (1 + (1 + (z'' - 2))), s15 >= 0, s15 <= 1, s'' >= 0, s'' <= 1 * z', z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1 + 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 2 + 3·z' + z'' }→ s3 :|: s3 >= 0, s3 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 1 }→ 0 :|: z1 >= 0, z'' - 1 >= 0, z' = 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 4 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 3 + z'' }→ s5 :|: s5 >= 0, s5 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + z'' }→ s6 :|: s6 >= 0, s6 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ -1 + 4·z' + 2·z'·z'' + -1·z'' }→ s9 :|: s7 >= 0, s7 <= 2 * ((z' - 2) * z'') + 2 * z'', s8 >= 0, s8 <= 1 * z'' + 1 * s7, s9 >= 0, s9 <= 1 * z'' + 1 * s8, z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0

Function symbols to be analyzed: {if,pr}, {divides}, {prime}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [1]
div: runtime: O(n1) [3 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [5 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
times: runtime: O(n2) [3 + 4·z' + 2·z'·z'' + z''], size: O(n2) [2·z'·z'' + 2·z'']
if: runtime: ?, size: O(1) [1]
pr: runtime: ?, size: O(1) [1]

(43) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using KoAT for: if
after applying outer abstraction to obtain an ITS,
resulting in: O(n3) with polynomial bound: 12 + 7·z'' + 18·z''·z1 + 8·z''·z12 + 23·z1 + 6·z12

Computed RUNTIME bound using KoAT for: pr
after applying outer abstraction to obtain an ITS,
resulting in: O(n3) with polynomial bound: 5 + 4·z' + 6·z'·z'' + 8·z'·z''2 + 14·z'' + 6·z''2

(44) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 6 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 11 + 4·s' + 2·s'·z' + s10 + 2·z' + 3·z'' }→ s11 :|: s10 >= 0, s10 <= 2 * (s' * z') + 2 * z', s11 >= 0, s11 <= 1, s' >= 0, s' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 6 + s12 + z' }→ s13 :|: s12 >= 0, s12 <= 2 * (0 * z') + 2 * z', s13 >= 0, s13 <= 1, z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 0 :|: z'' - 1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ 0 :|: z'' >= 0, z1 >= 0, z' = 1
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 + z' }→ 1 + s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 9 + 4·s'' + 2·s''·z'' + s14 + 3·z' + z'' }→ if(s15, z', 1 + (z'' - 2)) :|: s14 >= 0, s14 <= 2 * (s'' * (1 + (1 + (z'' - 2)))) + 2 * (1 + (1 + (z'' - 2))), s15 >= 0, s15 <= 1, s'' >= 0, s'' <= 1 * z', z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1 + 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 2 + 3·z' + z'' }→ s3 :|: s3 >= 0, s3 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 1 }→ 0 :|: z1 >= 0, z'' - 1 >= 0, z' = 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 4 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 3 + z'' }→ s5 :|: s5 >= 0, s5 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + z'' }→ s6 :|: s6 >= 0, s6 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ -1 + 4·z' + 2·z'·z'' + -1·z'' }→ s9 :|: s7 >= 0, s7 <= 2 * ((z' - 2) * z'') + 2 * z'', s8 >= 0, s8 <= 1 * z'' + 1 * s7, s9 >= 0, s9 <= 1 * z'' + 1 * s8, z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0

Function symbols to be analyzed: {divides}, {prime}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [1]
div: runtime: O(n1) [3 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [5 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
times: runtime: O(n2) [3 + 4·z' + 2·z'·z'' + z''], size: O(n2) [2·z'·z'' + 2·z'']
if: runtime: O(n3) [12 + 7·z'' + 18·z''·z1 + 8·z''·z12 + 23·z1 + 6·z12], size: O(1) [1]
pr: runtime: O(n3) [5 + 4·z' + 6·z'·z'' + 8·z'·z''2 + 14·z'' + 6·z''2], size: O(1) [1]

(45) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(46) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 6 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 11 + 4·s' + 2·s'·z' + s10 + 2·z' + 3·z'' }→ s11 :|: s10 >= 0, s10 <= 2 * (s' * z') + 2 * z', s11 >= 0, s11 <= 1, s' >= 0, s' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 6 + s12 + z' }→ s13 :|: s12 >= 0, s12 <= 2 * (0 * z') + 2 * z', s13 >= 0, s13 <= 1, z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 0 :|: z'' - 1 >= 0, z' = 0
if(z', z'', z1) -{ 6 + 4·z'' + 6·z''·z1 + 8·z''·z12 + 14·z1 + 6·z12 }→ s16 :|: s16 >= 0, s16 <= 1, z'' >= 0, z1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ 0 :|: z'' >= 0, z1 >= 0, z' = 1
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 + z' }→ 1 + s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 4 + 4·s'' + 2·s''·z'' + s14 + 2·z'·z'' + 8·z'·z''2 + 12·z'' + 6·z''2 }→ s17 :|: s17 >= 0, s17 <= 1, s14 >= 0, s14 <= 2 * (s'' * (1 + (1 + (z'' - 2)))) + 2 * (1 + (1 + (z'' - 2))), s15 >= 0, s15 <= 1, s'' >= 0, s'' <= 1 * z', z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1 + 0
prime(z') -{ -2 + 8·z' + -4·z'2 + 8·z'3 }→ s18 :|: s18 >= 0, s18 <= 1, z' - 2 >= 0
quot(z', z'', z1) -{ 2 + 3·z' + z'' }→ s3 :|: s3 >= 0, s3 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 1 }→ 0 :|: z1 >= 0, z'' - 1 >= 0, z' = 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 4 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 3 + z'' }→ s5 :|: s5 >= 0, s5 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + z'' }→ s6 :|: s6 >= 0, s6 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ -1 + 4·z' + 2·z'·z'' + -1·z'' }→ s9 :|: s7 >= 0, s7 <= 2 * ((z' - 2) * z'') + 2 * z'', s8 >= 0, s8 <= 1 * z'' + 1 * s7, s9 >= 0, s9 <= 1 * z'' + 1 * s8, z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0

Function symbols to be analyzed: {divides}, {prime}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [1]
div: runtime: O(n1) [3 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [5 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
times: runtime: O(n2) [3 + 4·z' + 2·z'·z'' + z''], size: O(n2) [2·z'·z'' + 2·z'']
if: runtime: O(n3) [12 + 7·z'' + 18·z''·z1 + 8·z''·z12 + 23·z1 + 6·z12], size: O(1) [1]
pr: runtime: O(n3) [5 + 4·z' + 6·z'·z'' + 8·z'·z''2 + 14·z'' + 6·z''2], size: O(1) [1]

(47) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: divides
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(48) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 6 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 11 + 4·s' + 2·s'·z' + s10 + 2·z' + 3·z'' }→ s11 :|: s10 >= 0, s10 <= 2 * (s' * z') + 2 * z', s11 >= 0, s11 <= 1, s' >= 0, s' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 6 + s12 + z' }→ s13 :|: s12 >= 0, s12 <= 2 * (0 * z') + 2 * z', s13 >= 0, s13 <= 1, z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 0 :|: z'' - 1 >= 0, z' = 0
if(z', z'', z1) -{ 6 + 4·z'' + 6·z''·z1 + 8·z''·z12 + 14·z1 + 6·z12 }→ s16 :|: s16 >= 0, s16 <= 1, z'' >= 0, z1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ 0 :|: z'' >= 0, z1 >= 0, z' = 1
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 + z' }→ 1 + s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 4 + 4·s'' + 2·s''·z'' + s14 + 2·z'·z'' + 8·z'·z''2 + 12·z'' + 6·z''2 }→ s17 :|: s17 >= 0, s17 <= 1, s14 >= 0, s14 <= 2 * (s'' * (1 + (1 + (z'' - 2)))) + 2 * (1 + (1 + (z'' - 2))), s15 >= 0, s15 <= 1, s'' >= 0, s'' <= 1 * z', z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1 + 0
prime(z') -{ -2 + 8·z' + -4·z'2 + 8·z'3 }→ s18 :|: s18 >= 0, s18 <= 1, z' - 2 >= 0
quot(z', z'', z1) -{ 2 + 3·z' + z'' }→ s3 :|: s3 >= 0, s3 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 1 }→ 0 :|: z1 >= 0, z'' - 1 >= 0, z' = 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 4 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 3 + z'' }→ s5 :|: s5 >= 0, s5 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + z'' }→ s6 :|: s6 >= 0, s6 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ -1 + 4·z' + 2·z'·z'' + -1·z'' }→ s9 :|: s7 >= 0, s7 <= 2 * ((z' - 2) * z'') + 2 * z'', s8 >= 0, s8 <= 1 * z'' + 1 * s7, s9 >= 0, s9 <= 1 * z'' + 1 * s8, z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0

Function symbols to be analyzed: {divides}, {prime}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [1]
div: runtime: O(n1) [3 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [5 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
times: runtime: O(n2) [3 + 4·z' + 2·z'·z'' + z''], size: O(n2) [2·z'·z'' + 2·z'']
if: runtime: O(n3) [12 + 7·z'' + 18·z''·z1 + 8·z''·z12 + 23·z1 + 6·z12], size: O(1) [1]
pr: runtime: O(n3) [5 + 4·z' + 6·z'·z'' + 8·z'·z''2 + 14·z'' + 6·z''2], size: O(1) [1]
divides: runtime: ?, size: O(1) [1]

(49) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using KoAT for: divides
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 21 + 11·z' + 4·z'·z'' + 7·z''

(50) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 6 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 11 + 4·s' + 2·s'·z' + s10 + 2·z' + 3·z'' }→ s11 :|: s10 >= 0, s10 <= 2 * (s' * z') + 2 * z', s11 >= 0, s11 <= 1, s' >= 0, s' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 6 + s12 + z' }→ s13 :|: s12 >= 0, s12 <= 2 * (0 * z') + 2 * z', s13 >= 0, s13 <= 1, z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 0 :|: z'' - 1 >= 0, z' = 0
if(z', z'', z1) -{ 6 + 4·z'' + 6·z''·z1 + 8·z''·z12 + 14·z1 + 6·z12 }→ s16 :|: s16 >= 0, s16 <= 1, z'' >= 0, z1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ 0 :|: z'' >= 0, z1 >= 0, z' = 1
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 + z' }→ 1 + s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 4 + 4·s'' + 2·s''·z'' + s14 + 2·z'·z'' + 8·z'·z''2 + 12·z'' + 6·z''2 }→ s17 :|: s17 >= 0, s17 <= 1, s14 >= 0, s14 <= 2 * (s'' * (1 + (1 + (z'' - 2)))) + 2 * (1 + (1 + (z'' - 2))), s15 >= 0, s15 <= 1, s'' >= 0, s'' <= 1 * z', z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1 + 0
prime(z') -{ -2 + 8·z' + -4·z'2 + 8·z'3 }→ s18 :|: s18 >= 0, s18 <= 1, z' - 2 >= 0
quot(z', z'', z1) -{ 2 + 3·z' + z'' }→ s3 :|: s3 >= 0, s3 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 1 }→ 0 :|: z1 >= 0, z'' - 1 >= 0, z' = 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 4 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 3 + z'' }→ s5 :|: s5 >= 0, s5 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + z'' }→ s6 :|: s6 >= 0, s6 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ -1 + 4·z' + 2·z'·z'' + -1·z'' }→ s9 :|: s7 >= 0, s7 <= 2 * ((z' - 2) * z'') + 2 * z'', s8 >= 0, s8 <= 1 * z'' + 1 * s7, s9 >= 0, s9 <= 1 * z'' + 1 * s8, z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0

Function symbols to be analyzed: {prime}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [1]
div: runtime: O(n1) [3 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [5 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
times: runtime: O(n2) [3 + 4·z' + 2·z'·z'' + z''], size: O(n2) [2·z'·z'' + 2·z'']
if: runtime: O(n3) [12 + 7·z'' + 18·z''·z1 + 8·z''·z12 + 23·z1 + 6·z12], size: O(1) [1]
pr: runtime: O(n3) [5 + 4·z' + 6·z'·z'' + 8·z'·z''2 + 14·z'' + 6·z''2], size: O(1) [1]
divides: runtime: O(n2) [21 + 11·z' + 4·z'·z'' + 7·z''], size: O(1) [1]

(51) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(52) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 6 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 11 + 4·s' + 2·s'·z' + s10 + 2·z' + 3·z'' }→ s11 :|: s10 >= 0, s10 <= 2 * (s' * z') + 2 * z', s11 >= 0, s11 <= 1, s' >= 0, s' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 6 + s12 + z' }→ s13 :|: s12 >= 0, s12 <= 2 * (0 * z') + 2 * z', s13 >= 0, s13 <= 1, z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 0 :|: z'' - 1 >= 0, z' = 0
if(z', z'', z1) -{ 6 + 4·z'' + 6·z''·z1 + 8·z''·z12 + 14·z1 + 6·z12 }→ s16 :|: s16 >= 0, s16 <= 1, z'' >= 0, z1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ 0 :|: z'' >= 0, z1 >= 0, z' = 1
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 + z' }→ 1 + s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 4 + 4·s'' + 2·s''·z'' + s14 + 2·z'·z'' + 8·z'·z''2 + 12·z'' + 6·z''2 }→ s17 :|: s17 >= 0, s17 <= 1, s14 >= 0, s14 <= 2 * (s'' * (1 + (1 + (z'' - 2)))) + 2 * (1 + (1 + (z'' - 2))), s15 >= 0, s15 <= 1, s'' >= 0, s'' <= 1 * z', z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1 + 0
prime(z') -{ -2 + 8·z' + -4·z'2 + 8·z'3 }→ s18 :|: s18 >= 0, s18 <= 1, z' - 2 >= 0
quot(z', z'', z1) -{ 2 + 3·z' + z'' }→ s3 :|: s3 >= 0, s3 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 1 }→ 0 :|: z1 >= 0, z'' - 1 >= 0, z' = 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 4 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 3 + z'' }→ s5 :|: s5 >= 0, s5 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + z'' }→ s6 :|: s6 >= 0, s6 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ -1 + 4·z' + 2·z'·z'' + -1·z'' }→ s9 :|: s7 >= 0, s7 <= 2 * ((z' - 2) * z'') + 2 * z'', s8 >= 0, s8 <= 1 * z'' + 1 * s7, s9 >= 0, s9 <= 1 * z'' + 1 * s8, z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0

Function symbols to be analyzed: {prime}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [1]
div: runtime: O(n1) [3 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [5 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
times: runtime: O(n2) [3 + 4·z' + 2·z'·z'' + z''], size: O(n2) [2·z'·z'' + 2·z'']
if: runtime: O(n3) [12 + 7·z'' + 18·z''·z1 + 8·z''·z12 + 23·z1 + 6·z12], size: O(1) [1]
pr: runtime: O(n3) [5 + 4·z' + 6·z'·z'' + 8·z'·z''2 + 14·z'' + 6·z''2], size: O(1) [1]
divides: runtime: O(n2) [21 + 11·z' + 4·z'·z'' + 7·z''], size: O(1) [1]

(53) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: prime
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(54) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 6 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 11 + 4·s' + 2·s'·z' + s10 + 2·z' + 3·z'' }→ s11 :|: s10 >= 0, s10 <= 2 * (s' * z') + 2 * z', s11 >= 0, s11 <= 1, s' >= 0, s' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 6 + s12 + z' }→ s13 :|: s12 >= 0, s12 <= 2 * (0 * z') + 2 * z', s13 >= 0, s13 <= 1, z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 0 :|: z'' - 1 >= 0, z' = 0
if(z', z'', z1) -{ 6 + 4·z'' + 6·z''·z1 + 8·z''·z12 + 14·z1 + 6·z12 }→ s16 :|: s16 >= 0, s16 <= 1, z'' >= 0, z1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ 0 :|: z'' >= 0, z1 >= 0, z' = 1
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 + z' }→ 1 + s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 4 + 4·s'' + 2·s''·z'' + s14 + 2·z'·z'' + 8·z'·z''2 + 12·z'' + 6·z''2 }→ s17 :|: s17 >= 0, s17 <= 1, s14 >= 0, s14 <= 2 * (s'' * (1 + (1 + (z'' - 2)))) + 2 * (1 + (1 + (z'' - 2))), s15 >= 0, s15 <= 1, s'' >= 0, s'' <= 1 * z', z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1 + 0
prime(z') -{ -2 + 8·z' + -4·z'2 + 8·z'3 }→ s18 :|: s18 >= 0, s18 <= 1, z' - 2 >= 0
quot(z', z'', z1) -{ 2 + 3·z' + z'' }→ s3 :|: s3 >= 0, s3 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 1 }→ 0 :|: z1 >= 0, z'' - 1 >= 0, z' = 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 4 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 3 + z'' }→ s5 :|: s5 >= 0, s5 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + z'' }→ s6 :|: s6 >= 0, s6 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ -1 + 4·z' + 2·z'·z'' + -1·z'' }→ s9 :|: s7 >= 0, s7 <= 2 * ((z' - 2) * z'') + 2 * z'', s8 >= 0, s8 <= 1 * z'' + 1 * s7, s9 >= 0, s9 <= 1 * z'' + 1 * s8, z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0

Function symbols to be analyzed: {prime}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [1]
div: runtime: O(n1) [3 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [5 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
times: runtime: O(n2) [3 + 4·z' + 2·z'·z'' + z''], size: O(n2) [2·z'·z'' + 2·z'']
if: runtime: O(n3) [12 + 7·z'' + 18·z''·z1 + 8·z''·z12 + 23·z1 + 6·z12], size: O(1) [1]
pr: runtime: O(n3) [5 + 4·z' + 6·z'·z'' + 8·z'·z''2 + 14·z'' + 6·z''2], size: O(1) [1]
divides: runtime: O(n2) [21 + 11·z' + 4·z'·z'' + 7·z''], size: O(1) [1]
prime: runtime: ?, size: O(1) [1]

(55) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using KoAT for: prime
after applying outer abstraction to obtain an ITS,
resulting in: O(n3) with polynomial bound: 8·z' + 8·z'3

(56) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 6 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 11 + 4·s' + 2·s'·z' + s10 + 2·z' + 3·z'' }→ s11 :|: s10 >= 0, s10 <= 2 * (s' * z') + 2 * z', s11 >= 0, s11 <= 1, s' >= 0, s' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 6 + s12 + z' }→ s13 :|: s12 >= 0, s12 <= 2 * (0 * z') + 2 * z', s13 >= 0, s13 <= 1, z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 0 :|: z'' - 1 >= 0, z' = 0
if(z', z'', z1) -{ 6 + 4·z'' + 6·z''·z1 + 8·z''·z12 + 14·z1 + 6·z12 }→ s16 :|: s16 >= 0, s16 <= 1, z'' >= 0, z1 >= 0, z' = 0
if(z', z'', z1) -{ 1 }→ 0 :|: z'' >= 0, z1 >= 0, z' = 1
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 + z' }→ 1 + s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 4 + 4·s'' + 2·s''·z'' + s14 + 2·z'·z'' + 8·z'·z''2 + 12·z'' + 6·z''2 }→ s17 :|: s17 >= 0, s17 <= 1, s14 >= 0, s14 <= 2 * (s'' * (1 + (1 + (z'' - 2)))) + 2 * (1 + (1 + (z'' - 2))), s15 >= 0, s15 <= 1, s'' >= 0, s'' <= 1 * z', z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1 + 0
prime(z') -{ -2 + 8·z' + -4·z'2 + 8·z'3 }→ s18 :|: s18 >= 0, s18 <= 1, z' - 2 >= 0
quot(z', z'', z1) -{ 2 + 3·z' + z'' }→ s3 :|: s3 >= 0, s3 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 1 }→ 0 :|: z1 >= 0, z'' - 1 >= 0, z' = 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 4 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 3 + z'' }→ s5 :|: s5 >= 0, s5 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + z'' }→ s6 :|: s6 >= 0, s6 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ -1 + 4·z' + 2·z'·z'' + -1·z'' }→ s9 :|: s7 >= 0, s7 <= 2 * ((z' - 2) * z'') + 2 * z'', s8 >= 0, s8 <= 1 * z'' + 1 * s7, s9 >= 0, s9 <= 1 * z'' + 1 * s8, z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0

Function symbols to be analyzed:
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [1]
div: runtime: O(n1) [3 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [5 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
times: runtime: O(n2) [3 + 4·z' + 2·z'·z'' + z''], size: O(n2) [2·z'·z'' + 2·z'']
if: runtime: O(n3) [12 + 7·z'' + 18·z''·z1 + 8·z''·z12 + 23·z1 + 6·z12], size: O(1) [1]
pr: runtime: O(n3) [5 + 4·z' + 6·z'·z'' + 8·z'·z''2 + 14·z'' + 6·z''2], size: O(1) [1]
divides: runtime: O(n2) [21 + 11·z' + 4·z'·z'' + 7·z''], size: O(1) [1]
prime: runtime: O(n3) [8·z' + 8·z'3], size: O(1) [1]

(57) FinalProof (EQUIVALENT transformation)

Computed overall runtime complexity

(58) BOUNDS(1, n^3)